package cn.clazz.interfaced

/**
  * Created by lzd on 2018/9/5.
  */
trait HelloTrait {
  def hello(name: String)
}

trait MakeTrait{
  def make(w:Wroker)
}

class Wroker(var name:String)extends HelloTrait with MakeTrait{
  override def hello(name: String): Unit =  println("hello ,"+name)

  override def make(w: Wroker): Unit = println("hello, my name is "+name+" you name is "+w.name)
}

object Test{
  def main(args: Array[String]): Unit = {
    val p1 = new Wroker("zhangsan")
    val p2 = new Wroker("lisi")
    p1.hello("wangwu")
    p2.make(p2)
  }
}
